<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<input type="text" v-model="msg" @keyup.enter="keyDown" />
			<input type="text" v-model="msg1" @keyup.f1="keyDown" />
		</div>
		<script type="text/javascript">
			//自定义全局按键修饰符
			Vue.config.keyCodes.f1=112
			new Vue({
				el:"#app",
				data:{
					msg:"enter",
					msg1:"f1"
				},
				methods:{
					keyDown:function(){
						alert(msg="you keydown this key")
					}
				}
			});
		</script>
	</body>
</html>
